#include "vortex/core/cuda_utils.h"


bool __check_cuda_runtime(cudaError_t code, const char* op, const char* file, int line)
{
    if (code != cudaSuccess)
    {
        const char* err_name = cudaGetErrorName(code);
        const char* err_message = cudaGetErrorString(code);
        printf("runtime error: %s:%d %s failed.\n code = %s, message = %s\n", file, line, op, err_name, err_message);
        return false;
    }
    return true;
}
